From: kaf24@firebug.cl.cam.ac.uk Date: Mon, 23 Jan 2006 15:27:00 +0000 (+0100) Subject: The present pud_offset_k implementation runs the value read through X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16541^2~8 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=05e845bdedb8c22bda0ad097b39eb5a3b6f5b078;p=xen.git The present pud_offset_k implementation runs the value read through the m2p translation process twice. With that removed, it can then also be simplified. Signed-off-by: Jan Beulich --- diff --git a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h index 0e00baf30e..010044c623 100644 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h @@ -417,12 +417,7 @@ static inline pud_t *__pud_offset_k(pud_t *pud, unsigned long address) Other CPUs get synced lazily via the page fault handler. */ static inline pud_t *pud_offset_k(unsigned long address) { - unsigned long addr; - - addr = pgd_val(init_level4_pgt[pud_index(address)]); - addr &= PHYSICAL_PAGE_MASK; /* machine physical */ - addr = machine_to_phys(addr); - return __pud_offset_k((pud_t *)__va(addr), address); + return pud_offset(pgd_offset_k(address), address); } /* PMD - Level 2 access */